package com.ljfiction.book.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ljfiction.book.Baner.BookdatasBean;
import com.ljfiction.book.R;
import com.ljfiction.book.tools.ScreenUtils;
import com.zhy.autolayout.utils.AutoUtils;


import java.util.List;



/**
 * Created by Administrator on 2017/7/12.
 */

public class RecycleAdapter extends BaseQuickAdapter<BookdatasBean.DataBean.SimilarRecommendationBean,BaseViewHolder>{

    public RecycleAdapter(@LayoutRes int layoutResId, @Nullable List<BookdatasBean.DataBean.SimilarRecommendationBean> data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, BookdatasBean.DataBean.SimilarRecommendationBean item) {
        AutoUtils.autoSize(helper.itemView);
        Glide.with(mContext).load(item.getBookImage()).into((ImageView) helper.getView(R.id.recycle_bookImage));
        helper.setText(R.id.recycle_bookName,item.getBookName());
    }
}

